package com.wink.admin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;


/**
 * 角色实体类
 *
 * @author xw
 * @date 2020/11/5 14:51
 */
@Data
@Entity
@Table(name = "sys_role")
@TableName("sys_role")
@EqualsAndHashCode(callSuper = true)
@org.hibernate.annotations.Table(appliesTo = "sys_role", comment = "角色表")
public class SysRole extends BaseEntity {

    @Column(name = "role_name", columnDefinition = ("varchar(30) not null comment '角色名称'"))
    @NotBlank(message = "角色名称不能为空")
    private String roleName;

    @Column(name = "status", columnDefinition = ("tinyint(4) default 0 comment '角色状态：0-正常,1-停用'"))
    private Integer status;

    @Column(name = "created_user", columnDefinition = ("varchar(30) default null comment '创建人'"))
    private String createdUser;

    @Column(name = "description", columnDefinition = ("varchar(500) default null comment '描述'"))
    private String description;

}
